home *** CD-ROM | disk | FTP | other *** search
- Path: news.eecs.uic.edu!usenet
- From: smutreja@eecs.uic.edu (Shitij Mutreja)
- Newsgroups: comp.lang.c++
- Subject: FILE I/O problem in C++????
- Date: 2 Feb 1996 21:55:25 GMT
- Organization: University of Illinois at Chicago
- Distribution: world
- Message-ID: <4eu18d$f1r@news.eecs.uic.edu>
- Reply-To: smutreja@eecs.uic.edu
- NNTP-Posting-Host: bert.eecs.uic.edu
-
- Hi,
-
- I am writing some code in which I open a file for input and output as
-
- file.open("atm.out", ios::in|ios::app);
-
- Then I go on to search the file for an object with a required attribute
- value(data member value). I get this object into a temp object as
- file>>acm1; // >> has been overloaded
-
- and then modify the attribute. I mark the position using
- file.seekp(mark);
-
- However I am finding that the modified object is being written only
- at the END of the file.
-
- Anyone have a clue as to why this happens, and how I can get around this problem.
-
- Thanks,
- Shitij Mutreja.
-
-
-
-